<?php

// ini_set("display_errors", "On");
// error_reporting(E_ALL);
date_default_timezone_set("PRC");
try {
    defined("ROOT_PATH") || define("ROOT_PATH", realpath(dirname(__DIR__)));
    defined("APP_PATH") || define("APP_PATH", ROOT_PATH . '/app');

    /**
     * Read the configuration
     */
    $config = include __DIR__ . "/../app/config/config.php";

    /**
     * Read auto-loader
     */
    include __DIR__ . "/../app/config/loader.php";

    /**
     * Read services
     */
    include __DIR__ . "/../app/config/services.php";
    /**
     * Handle the request
     */

    $application = new \Phalcon\Mvc\Application($di);
    echo $application->handle()->getContent();

} catch (\Exception $e) {
    echo $e->getMessage();
}
